package Book;

/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-12-24
 * Time:10:39
 */
public class BookList {
    private int usedSize;
    private int capacity = 10;
    public Book[] books = new Book[this.capacity];

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public BookList(){
        books[0] = new Book("三国演义","罗贯中",99,"小说");
        books[1] = new Book("西游记","吴承恩",98,"小说");
        books[2] = new Book("红楼梦","曹雪芹",109,"小说");
        this.usedSize = 3;
    }
    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public void setBooks(int i,Book book){
        this.books[i] = book;

    }

    public Book getBook(int i){
        return books[i];
    }
}
